package com.front.teacher.teacherapp.view.fragment;


import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.front.teacher.teacherapp.R;
import com.front.teacher.teacherapp.base.BaseFragment;
import com.front.teacher.teacherapp.presenter.DummyPresenter;
import com.front.teacher.teacherapp.view.impl.IDummyView;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 * 这是做活动的页面的碎片
 */
public class DummyFragment extends BaseFragment<IDummyView, DummyPresenter> implements IDummyView {
    private static final String PARMS_TILTE = "title";
    @InjectView(R.id.text_title_dummy)
    TextView textTitleDummy;

    public static DummyFragment newInstance(String title) {
        Bundle args = new Bundle();
        args.putString(PARMS_TILTE, title);
        DummyFragment fragment = new DummyFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public DummyPresenter initPresenter() {
        return new DummyPresenter(this);
    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_dummy;
    }

    @Override
    protected void initData() {
        textTitleDummy.setText(getArguments().getString(PARMS_TILTE));
    }

    @Override
    protected void initView() {

    }


    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.reset(this);
    }
}
